import java.util.Arrays;

public class ArrayDemo06 {
    public static void main(String[] args) {
        int[] nums = new int[50];
        int index = 0;// 记录索引
        for (int i = 0; i <= 100; i++) {
            if (i % 2 != 0) {
                nums[index] = i;
                index++;
            }
        }
        System.out.println(Arrays.toString(nums));
    }
}
